package com.itheima.twodimensionalarray;

public class Demo1TwoDimensionalArray {
    public static void main(String[] args) {
        int[][] arr = new int[4][3];
        System.out.println(arr); // [[I@50cbc42f

        System.out.println(arr[1]); // [I@75412c2f

        System.out.println(arr[0][0]); // 0
        System.out.println(arr[1][1]); // 0
        System.out.println(arr[2][2]); // 0

        arr[0][0] = 11;
        arr[1][1] = 22;
        arr[2][2] = 33;
        //二维数组遍历
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(arr[i][j]+" ");
            }
            System.out.println();
        }
    }
}
